# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=spdk
pkgver=23.09
pkgrel=1
pkgdesc="Storage Performance Development Kit"
url="https://spdk.io/"
# only supports 64bit
arch="aarch64 ppc64le x86_64"
license="BSD-3-Clause"
makedepends="
	bash
	bsd-compat-headers
	coreutils
	cunit-dev
	dpdk-dev
	isa-l-dev
	libaio-dev
	linux-headers
	ncurses-dev
	openssl-dev>3
	python3
	py3-setuptools
	util-linux-dev
	"
subpackages="$pkgname-static $pkgname-dev $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/spdk/spdk/archive/v$pkgver.tar.gz
	isal.patch
	remove-stupid.patch
	"

build() {
	# this is not a GNU autoconf script
	./configure \
		--prefix=/usr \
		--with-shared \
		--with-dpdk \
		--with-system-isal \
		--without-crypto
	make
}

check() {
	./test/unit/unittest.sh
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
bfff0326ea26db6f888aa30ca33ef5b0936992a21484d84224ece7ff68ee005683812b33027439dc8f3473bd76c7adcc5a460019836c84064396204958d75a42  spdk-23.09.tar.gz
33ec27866069db1eb63d0f3cd6bedab0dc41c701436f35a14e771cda31d7569b2fccf89dc6ac2dd5a6b96caed9c178c72622d46beaaf3469a26678b4c178161e  isal.patch
087f189776699685791900014beb0ab5d8fc369133b205368100aea4e6ea4d1c85061bb1719bffa21b6a949639180cb8966e85f553efc85eaeb608a7940ffc3b  remove-stupid.patch
"
